package cn.ift8.h.untils;


import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.classic.Session;

/**
 * Created by ZJI on 2015/8/6.
 */
public class HibUnitls {
    public static SessionFactory sessionFactory;
    static {
        Configuration configuration=new Configuration();
        configuration.configure();
        sessionFactory=configuration.buildSessionFactory();
    }

    public static Session openSession(){
        return sessionFactory.openSession();
    }
}
